package predatorprey;
import java.util.*;

/**
 *
 * @author Kenneth Aamås, Vegard Hovlid, Eirik Korsnes.
 */
public class Plant extends Agent
{
    private boolean alive;
    
    public Plant(Field field, Location location)
    {
        super(field, location);
        alive = true;
    }
    
    public void setDead()
    {
        alive = false;
        if(location != null) 
        {
            field.clear(location);
            location = null;
            field = null;
        }
    }
    
    protected boolean isAlive()
    {
        return alive;
    }
    
    public void act(List<Agent> newPlant)
    {
        if(isAlive())
        {
            
        }
    }
}
